﻿@model Titul.Help.Models.Product
@{
    Layout = MVC.Shared.Views._Layout;
    ViewBag.Title = "Редактирование продуктов";
}

<h2>@ViewBag.Title</h2>
@using (Html.BeginForm(MVC.Products.Edit(), FormMethod.Post, new { @class = "form" }))
{
    @Html.AntiForgeryToken()

    @Html.HiddenFor(x => x.Id)

    <div class="form-group">
        @Html.LabelFor(x => x.Name)
        @Html.EditorFor(x => x.Name, new { htmlAttributes = new { @class = "form-control" } })
        @Html.ValidationMessageFor(x => x.Name)
    </div>


    <div class="form-group">
        @Html.LabelFor(x => x.ImageUrl)
        @Html.EditorFor(x => x.ImageUrl, new { htmlAttributes = new { @class = "form-control" } })
        @Html.ValidationMessageFor(x => x.ImageUrl)
    </div>


    <div class="form-group">
        @Html.LabelFor(x => x.Appointment)
        @Html.EditorFor(x => x.Appointment, new { htmlAttributes = new { @class = "form-control" } })
        @Html.ValidationMessageFor(x => x.Appointment)
    </div>


    <div class="form-group">
        @Html.LabelFor(x => x.Description)
        @Html.EditorFor(x => x.Description, new { htmlAttributes = new { @class = "form-control" } })
        @Html.ValidationMessageFor(x => x.Description)
    </div>


    <div class="form-group">
        @Html.LabelFor(x => x.SeoUrl)
        @Html.EditorFor(x => x.SeoUrl, new { htmlAttributes = new { @class = "form-control" } })
        @Html.ValidationMessageFor(x => x.SeoUrl)
    </div>


    <div class="btn-group btn-group-sm">
        <button type="submit" class="btn btn-default">Применить</button>
    </div>
}
@section scripts{
    @Scripts.Render("~/bundles/ckeditor")
    <script type="text/javascript">
        CKEDITOR.replaceAll();
    </script>
}

